Skip to content

Fix the testcase of restart_syncd failed due to expecting message error - #986

Closed
Harrison-SH wants to merge 1 commit into
sonic-net:masterfrom
Harrison-SH:pr1
Closed

Fix the testcase of restart_syncd failed due to expecting message error#986
Harrison-SH wants to merge 1 commit into
sonic-net:masterfrom
Harrison-SH:pr1

Conversation

@Harrison-SH

Copy link
Copy Markdown
Contributor

Description of PR
Fix the testcase of restart_syncd failed due to expecting message error.
1. Through "docker exec -i syncd ps aux | grep /usr/bin/syncd", The info of syncd as following:
admin@cel-seastone-01:~$ docker exec -i syncd ps aux | grep /usr/bin/syncd
root 42 0.0 0.0 107660 2820 pts/0 Sl 14:01 0:00 /usr/bin/dsserve /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile
root 52 24.5 8.3 1528312 337004 pts/0 Sl 14:01 14:13 /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile

  1. Through "pgrep "<syncd>" -a", The info of syncd as following:
    admin@cel-seastone-01:~$ pgrep "<syncd>" -a
    13448 /usr/bin/syncd --diag -u -p /etc/sai.d/sai.profile
    13643 /bin/bash /usr/local/bin/syncd.sh wait
    13647 /bin/bash /usr/bin/syncd.sh wait
    In the second part. the info of "syncd.sh" will interfer the checking of "/usr/bin/syncd". When the syncd is shutdown. We Maybe find the exist of "syncd.sh". Then cause to the failure of the case of restart_syncd. Just as following:
    [cel-seastone-01] => {
    "msg": [
    "15920 /bin/bash /usr/local/bin/syncd.sh wait",
    "15924 /bin/bash /usr/bin/syncd.sh wait"
    ]

Summary:
Fixes # (issue)
Type of change
[■] Bug fix

Approach
How did you do it?
How did you verify/test it?
passed the testcase of restart_syncd
Any platform specific information?
Supported testbed topology if it's a new test case?


- name: Look for syncd process
shell: pgrep "\<syncd\>" -a
shell: docker exec -i syncd ps aux | grep /usr/bin/syncd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or "pgrep -x syncd -a"

kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
5331ecd [vslib]: Fix MACsec bug in SCI and XPN (sonic-net#1003)
ac04509 Fix build issues on gcc-10 (sonic-net#999)
1b8ce97 [pipeline] Download swss common artifact in a separated directory (sonic-net#995)
7a2e096 Change sonic-buildimage.vs artifact source from CI build to official build. (sonic-net#992)
d5866a3 [vslib]: fix create MACsec SA error (sonic-net#986)
f36f7ce Added Support for enum query capability of Nexthop Group Type. (sonic-net#989)
323b89b Support for MACsec statistics (sonic-net#892)
26a8a12 Prevent other notification event storms to keep enqueue unchecked and drained all memory that leads to crashing the switch router (sonic-net#968)
0cb253a Fix object availability conversion (sonic-net#974)
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
 Fix the None Type Exception when Interface Table does not exist (cold
boot) as part of db migration (sonic-net#986)
@wangxin

wangxin commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

This PR has been open since July 2019 (~7 years). The affected file (ansible/roles/test/tasks/restart_syncd.yml) is part of the legacy Ansible-based test framework, which has largely been replaced by pytest-based tests.

The root cause diagnosis is valid — pgrep "\<syncd\>" can false-match syncd.sh wrapper scripts — but the syncd restart test has likely been rewritten in the pytest framework since then.

Recommend closing this PR as stale.

@wangxin

wangxin commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

Closing the PR.

@wangxin wangxin closed this Apr 3, 2026
arawat-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Apr 9, 2026
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary: Adds ai-review so people can comment /ai_review or
/ai_review_strict on their PR's
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement


### Back port request
- [ ] 202505
- [ ] 202511

### Approach
#### What is the motivation for this PR?

#### How did you do it?

#### How did you verify/test it?

#### Any platform specific information?

#### Supported testbed topology if it's a new test case?

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
arawat-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Apr 9, 2026
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md

Please provide following information to help code review process a bit
easier:
-->
### Description of PR
<!--
- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context. Where should
reviewer start? background context?
- List any dependencies that are required for this change.
-->

Summary: Adds ai-review so people can comment /ai_review or
/ai_review_strict on their PR's
Fixes # (issue)

### Type of change

<!--
- Fill x for your type of change.
- e.g.
- [x] Bug fix
-->

- [ ] Bug fix
- [ ] Testbed and Framework(new/improvement)
- [ ] New Test case
    - [ ] Skipped for non-supported platforms
- [ ] Test case improvement


### Back port request
- [ ] 202505
- [ ] 202511

### Approach
#### What is the motivation for this PR?

#### How did you do it?

#### How did you verify/test it?

#### Any platform specific information?

#### Supported testbed topology if it's a new test case?

### Documentation
<!--
(If it's a new feature, new test case)
Did you update documentation/Wiki relevant to your implementation?
Link to the wiki page?
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants